/* 标注界面样式 */
.main-content {
    height: calc(100vh - 140px);
}

.image-list-panel {
    height: 100%;
}

.annotation-panel {
    height: 100%;
}

.canvas-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

#annotationCanvas {
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
    z-index: 2;
}

.current-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    z-index: 1;
}

.image-list-item {
    cursor: pointer;
    transition: background-color 0.2s;
}

.image-list-item:hover {
    background-color: #f8f9fa;
}

.image-list-item.active {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.image-list-item .badge {
    font-size: 0.75em;
}

.toolbar {
    min-height: 70px;
}

.status-bar {
    min-height: 50px;
}

/* 标注框样式 */
.annotation-box {
    position: absolute;
    border: 2px solid #ff4444;
    background: rgba(255, 68, 68, 0.1);
    pointer-events: none;
}

.annotation-box.selected {
    border-color: #44ff44;
    background: rgba(68, 255, 68, 0.1);
}

.annotation-box .label {
    position: absolute;
    top: -25px;
    left: 0;
    background: rgba(255, 68, 68, 0.8);
    color: white;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 3px;
    white-space: nowrap;
}

.annotation-box.selected .label {
    background: rgba(68, 255, 68, 0.8);
}

/* 绘制中的临时框 */
.drawing-box {
    position: absolute;
    border: 2px dashed #2196f3;
    background: rgba(33, 150, 243, 0.1);
    pointer-events: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .main-content {
        height: auto;
    }
    
    .image-list-panel {
        height: 300px;
        margin-bottom: 1rem;
    }
    
    .annotation-panel {
        height: 500px;
    }
    
    .toolbar .row > div {
        margin-bottom: 0.5rem;
    }
}

/* 滚动条样式 */
.image-list-panel .card-body {
    overflow-y: auto;
}

.image-list-panel .card-body::-webkit-scrollbar {
    width: 6px;
}

.image-list-panel .card-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.image-list-panel .card-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.image-list-panel .card-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 加载状态 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6c757d;
}

.loading::after {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}